package me.ezitku.base.dialog




/**
 * Created by yurqi on 4/17/2017.
 */

//@SuppressLint("ValidFragment")
//open class BottomDialog
//(var resId: Int = 0) : BottomSheetDialogFragment() {
//
//    constructor() : this(0) {
//
//    }
//
//
//    lateinit var mBehavior: BottomSheetBehavior<*>
//    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
//        val dialog = super.onCreateDialog(savedInstanceState) as BottomSheetDialog
//        val view = View.inflate(context, resId, null)
//        dialog.setContentView(view)
//        mBehavior = BottomSheetBehavior.from(view.parent as View)
//        return dialog
//
//    }
//
//    override fun onStart() {
//        super.onStart()
//        mBehavior.state = BottomSheetBehavior.STATE_EXPANDED
//    }
//
//    var state: Int
//        get() = BottomSheetBehavior.STATE_EXPANDED
//        set(value) {
//            mBehavior.state = value
//        }
//}
//
//
//fun FragmentActivity.bottomDialog(resId: Int, action: (BottomDialog.() -> Unit)? = null) {
//
//    BottomDialog(resId).show(this.supportFragmentManager, "default")
//
//}
//
//typealias BottomDialogState = BottomSheetBehavior<*>